package com.lqd.mall.interaction.basis;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 零起点
 * @create 2022-02-10 22:46
 */
@Setter
@Getter
@ToString
@MappedSuperclass
@Accessors(chain = true)
public class BasisEntity implements Serializable {
    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @Column(name = "del_flag")
    private String delFlag;
    /**
     * 创建者
     */
    @Column(name = "create_by")
    private String createBy;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "create_time")
    private Date createTime;
    /**
     * 更新者
     */
    @Column(name = "upate_by")
    private String updateBy;
    /**
     * 更新时间
     */
    @Column(name = "upate_time")
    private Date updateTime;
    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

}
